#ifndef SKIPRULESMODEL_H
#define SKIPRULESMODEL_H

#include <QAbstractTableModel>
#include <QRegExp>
#include <QPair>
class SkipRulesModel : public QAbstractTableModel
{
Q_OBJECT
public:
    explicit SkipRulesModel(QObject *parent = 0);
    void setList(QList< QPair<QRegExp, bool> > *skipRulesList);
    int rowCount(const QModelIndex &parent) const;
    int columnCount(const QModelIndex &parent) const;
    QVariant data(const QModelIndex &index, int role) const;
    bool setData(const QModelIndex &index, const QVariant &value, int role);
    QVariant headerData(int section,Qt::Orientation orientation, int role) const;
    Qt::ItemFlags flags(const QModelIndex &index) const;
    bool insertRows(int row, int count, const QModelIndex& parent);
    bool removeRows(int row, int count, const QModelIndex& parent);
    void update();
private:
    QList< QPair<QRegExp, bool> > *m_skipRulesList;
};

#endif // SKIPRULESMODEL_H
